<?php
/**
 *
 * @author lovebing <lovebing365@126.com> Created on 2014-10-5 23:54:26
 */
class Net {
    public static function getIp() {
        if(isset($_SERVER['HTTP_X_REAL_IP'])) {
            return $_SERVER['HTTP_X_REAL_IP'];
        }
        
        return $_SERVER['REMOTE_ADDR'];
    }
}
